<!DOCTYPE html>
<html lang="en">
<head>
    <title>WSD Admin</title>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link rel="stylesheet" href="__STATICURL__/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="__STATICURL__/css/bootstrap-responsive.min.css"/>
    <link rel="stylesheet" href="__STATICURL__/css/uniform.css"/>
    <link rel="stylesheet" href="__STATICURL__/css/select2.css"/>
    <link rel="stylesheet" href="__STATICURL__/css/matrix-style.css"/>
    <link rel="stylesheet" href="__STATICURL__/css/matrix-media.css"/>
    <link rel="stylesheet" href="__STATICURL__/css/bootstrap-wysihtml5.css"/>
    <link href="__STATICURL__/font-awesome/css/font-awesome.css" rel="stylesheet"/>
</head>
<body>
<include file="Common:header"/>
<div id="content">
    <!--breadcrumbs-->
    <div id="content-header">
        <div id="breadcrumb"><a href="__ROOT__/clover"><i class="icon-home"></i> 主页</a><a href="#"
                                                                                          class="current">员工列表</a></div>
    </div>
    <!--End-breadcrumbs-->
    <div class="container-fluid">
        <br/>

        <div class="control-group fl" style="width:200px;">
            <div class="controls" style="width:301px;">
                <select id="J_select_type">
                    <option value="0">-----显示全部-----</option>
                    <foreach name="{category_list}" item="row">
                        <notempty name="row.p_level">
                            <option
                            <if condition="$cat_id eq $row.id ">selected</if>
                            style="padding-left:{$row[p_level]*30}px;" value="{$row.id}">
                            <for start="0" end="$row.p_level">&nbsp;&nbsp;&nbsp;</for>
                            {$row.cat_name}</option>
                            <else/>
                            <option
                            <if condition="$cat_id eq $row.id ">selected</if>
                            style="font-weight:bold;" value="{$row.id}">{$row.cat_name}</option>
                        </notempty>
                    </foreach>
                </select>
            </div>
        </div>
        <div class="fr">
            <a style="float:right;" href="__URL__/add_author" class=" btn-icon-pg">
                <ul>
                    <li><i class="icon-plus"></i>添加员工</li>
                </ul>
            </a>
        </div>
        <div class="row-fluid">
            <div class="span12">
                <div class="widget-box" style="margin-top:0px;">
                    <div class="widget-title"><span class="icon"> <i class="icon-th"></i> </span>
                        <h5>员工列表</h5>
                    </div>
                    <div class="widget-content nopadding">
                        <ul class="recent-posts">
                            <notempty name="author_list">
                                <foreach name="{author_list}" item="vo" key="k">
                                    <li class="li_{$vo.id}" style="height:90px;overflow: hidden;">
                                        <div class="fl" style="margin-right:20px;"><img
                                                src="__UPLOADURL__/{$vo.author_img}" alt="pic" style="height:90px">
                                        </div>
                                        <div class="clearfix">
                                            <div class="article-post">
                                                <div class="fr"><a href="__URL__/edit_author?id={$vo.id}"
                                                                   class="btn btn-primary btn-mini">编辑</a>&nbsp;&nbsp;<a
                                                        href="javascript:void(0);"
                                                        class="btn btn-danger btn-mini J_delete" data-value="{$vo.id}">删除</a>
                                                </div>
                                                <span class="user-info"> <b>{$vo.author_name}</b> / 添加时间:{$vo.add_time|date="Y-m-d",###} </span>

                                                <p><a href="__URL__ /edit_author?id={$vo.id}">{$vo.author_intro|strip_tags}</a>
                                                </p>
                                            </div>
                                        </div>
                                    </li>
                                </foreach>
                                <li>
                                    <a href="__URL__" class="btn btn-warning btn-mini">查看全部</a>
                                </li>
                                <else/>
                                <li>暂无数据……</li>
                            </notempty>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--Footer-part-->
<include file="Common:footer"/>
<!--end-Footer-part-->
<script src="__STATICURL__/js/jquery.min.js"></script>
<script src="__STATICURL__/js/jquery.ui.custom.js"></script>
<script src="__STATICURL__/js/bootstrap.min.js"></script>
<script src="__STATICURL__/js/jquery.uniform.js"></script>
<script src="__STATICURL__/js/select2.min.js"></script>
<script src="__STATICURL__/js/jquery.dataTables.min.js"></script>
<script src="__STATICURL__/js/matrix.js"></script>
<script src="__STATICURL__/js/matrix.tables.js"></script>
</body>
</html>
<script type="text/javascript">
    $(document).ready(function ($) {
        $("#J_select_type").change(function () {
            var cat_id = $(this).val();
            window.location.href = "__URL__/index/cat_id/" + cat_id;
        });
        $(".J_delete").click(function () {
            var id = $(this).attr("data-value");
            if (confirm("确定要删除吗？") == true) {
                $.post('__URL__/do_delete', {id: id}, function (res) {
                    if (res) {
                        $(".li_" + id).fadeOut("fast");
                    } else {
                        alert("删除失败");
                    }
                });
            }
        });
    });
</script>
